package test.administrator.example.com.mvptest1.framework.support.viewstate.lce;

import test.administrator.example.com.mvptest1.framework.lce.MvpLceView;
import test.administrator.example.com.mvptest1.framework.support.viewstate.ViewState;

/**
 * Created by thinkpad on 2018/8/12.
 */

public interface LceViewState<M, V extends MvpLceView<M>> extends ViewState<V> {

	//三种状态
	//第一种：加载页面->加载状态
	int STATE_SHOW_LOADING = 0;
	//第二种：内容页面->显示内容
	int STATE_SHOW_CONTENT = 1;
	//第三种：错误页面->显示错误
	int STATE_SHOW_ERROR = -1;

	//设置内容页面状态->缓存内容数据
	void setStateShowContent(M loadedData);

	//设置错误页面状态->缓存错误信息
	void setStateShowError(Throwable e, boolean pullToRefresh);

	//设置加载页面状态->缓存加载数据
	void setStateShowLoading(boolean pullToRefresh);

	//是否处于加载状态
	boolean isLoadingState();

	//是否处于下拉刷新加载状态
	boolean isPullToRefreshLoadingState();

}































































































